package com.gxd.business.controller;

import com.gxd.business.domain.CallTrack;
import com.gxd.business.service.CallTrackService;
import com.gxd.common.core.controller.BaseController;
import com.gxd.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author gxd
 * @since 2025/6/17
 */
@RestController
@RequestMapping("/callTrack")
@Api(tags = "通话记录管理")
public class CallTrackController extends BaseController {

    @Autowired
    private CallTrackService callTrackService;

    @ApiOperation("添加或修改-通话记录")
    @PostMapping("/addOrEdit")
    public AjaxResult addOrEdit(@ApiParam(value = "通话记录实体", required = true) @Valid @RequestBody CallTrack callTrack) {
        return success(callTrackService.addOrEdit(callTrack));
    }
}
